/*
 * ServerPlayer.h
 *
 *  Created on: 2009-02-15
 *      Author: ck
 */

#ifndef SERVERPLAYER_H_
#define SERVERPLAYER_H_
#include <QPoint>
#include <QVector>
#include <QString>

class ServerPlayer {
public:
	enum Directions {
		DirUp, DirRight, DirLeft, DirDown
	};
	ServerPlayer(int id);
	virtual ~ServerPlayer();
	void initPlayer();
	void move();
	void changeDir(Directions d);
	void changeDir(QString d);
	QString getDir();


private:

	Directions dir;
	QVector<QPoint> body;
	QPoint addPoint;
	QPoint removePoint;
	int id;
	int lenght;
	bool wasRemove;
};

#endif /* SERVERPLAYER_H_ */
